From: Carlos Garnacho Date: Tue, 23 Aug 2022 16:29:09 +0000 (+0200) Subject: keyboard: Use the right property to figure out modifiers set size X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~452^2^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=622590179b33e3c4dc4d132fc8129671a397ed07;p=gnome-shell.git keyboard: Use the right property to figure out modifiers set size During development of the OSK updates, this._modifiers turned from an array into a Set(), but this location missed switching from length() to size() to get the cardinality of the contained values. As a result, the OSK misbehaved and resorted for key event forwarding for impossible keyvals, instead of handing them directly to the IM. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5766 Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 4bdac879a..895691c34 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1511,7 +1511,7 @@ var Keyboard = GObject.registerClass({ if (key.action !== 'modifier') { button.connect('commit', (actor, keyval, str) => { - if (this._modifiers.length === 0 && str !== '' && + if (this._modifiers.size === 0 && str !== '' && keyval && this._oskCompletionEnabled) { Main.inputMethod.handleVirtualKey(keyval); return;